/* ****************************************************************************
 *
 * Copyright (c) Microsoft Corporation. 
 *
 * This source code is subject to terms and conditions of the Microsoft Public License. A 
 * copy of the license can be found in the License.html file at the root of this distribution. If 
 * you cannot locate the  Microsoft Public License, please send an email to 
 * dlr@microsoft.com. By using this source code in any fashion, you are agreeing to be bound 
 * by the terms of the Microsoft Public License.
 *
 * You must not remove this notice, or any other, from this software.
 *
 * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
 * KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
 * PARTICULAR PURPOSE.
 * ***************************************************************************/

//////////////////////////////////////////////////////////////////////
// include guards
//////////////////////////////////////////////////////////////////////

#ifndef STLHELPER_INCLUDED_IGFX
	#define STLHELPER_INCLUDED_IGFX

#if _MSC_VER > 1000
#pragma once
#endif

#include <iostream>

//////////////////////////////////////////////////////////////////////
// STL neccessary declaration for vector
//////////////////////////////////////////////////////////////////////

#pragma warning(push)

#include <yvals.h>              // warning numbers get enabled in yvals.h 

#pragma warning(disable: 4018)  // signed/unsigned mismatch
#pragma warning(disable: 4100)  // unreferenced formal parameter
#pragma warning(disable: 4146)  // unary minus operator applied to unsigned type, result still unsigned
#pragma warning(disable: 4244)  // 'conversion' conversion from 'type1' to 'type2', possible loss of data
#pragma warning(disable: 4245)  // conversion from 'type1' to 'type2', signed/unsigned mismatch
#pragma warning(disable: 4511)  // 'class' : copy constructor could not be generated
#pragma warning(disable: 4512)  // 'class' : assignment operator could not be generated
#pragma warning(disable: 4663)  // C++ language change: to explicitly specialize class template 'vector'
#pragma warning(disable: 4710)  // 'function' : function not inlined
#pragma warning(disable: 4786)  // identifier was truncated to 'number' characters in the debug information

#include <stack>
#include <list>
#include <vector>
#ifdef max
	#undef max
#endif
#ifdef min
	#undef min
#endif

#include <valarray>

namespace markup
{ 
  template <typename T> 
  inline const T& min(const T& a, const T& b) 
  { return b < a ? b : a; } 

  template <typename T> 
  inline const T& max(const T& a, const T& b) 
  { return  a < b ? b : a; } 
} 

#include <string>
#include <strstream>
#include <sstream>
#include <fstream>
#include <strstream>
#ifndef _UNICODE
	namespace std
	{
		typedef string			_tstring;
		typedef ifstream		_tifstream;
		typedef ofstream		_tofstream;
		typedef istringstream	_tistringstream;
		typedef ostringstream	_tostringstream;
	}
#else
	namespace std
	{
		typedef wstring			_tstring;
		typedef wifstream		_tifstream;
		typedef wofstream		_tofstream;
		typedef wistringstream	_tistringstream;
		typedef wostringstream	_tostringstream;
	};
#endif

#pragma warning(pop)
#pragma warning(push)

#include <yvals.h>              // warning numbers get enabled in yvals.h 

#pragma warning(pop)

#pragma warning(disable: 4514)  // unreferenced inline/local function has been removed
#pragma warning(disable: 4710)  // 'function' : function not inlined
#pragma warning(disable: 4786)  // identifier was truncated to 'number' characters in the debug information

//#define _MARKUP_USE_MARKUP_LITE

#endif  // STLHELPER_INCLUDED_IGFX
